from PyQt6.QtWidgets import QWidget, QVBoxLayout
from .modules.window_table.table import WindowTable
from ..components.framed_widget import FramedWidget

class LeftPanel(QWidget):
    def __init__(self):
        super().__init__()
        self.init_ui()
        
    def init_ui(self):
        # 创建主布局
        self.layout = QVBoxLayout()
        self.layout.setContentsMargins(10, 10, 10, 10)
        self.layout.setSpacing(10)
        
        # 创建带框架的表格
        self.framed_table = FramedWidget("窗口列表")
        self.window_table = WindowTable()
        self.framed_table.add_widget(self.window_table)
        
        # 添加到主布局
        self.layout.addWidget(self.framed_table)
        
        # 添加弹簧
        self.layout.addStretch()
        
        # 设置主布局
        self.setLayout(self.layout)